package org.autumn.banner;

import cn.hutool.core.io.file.FileReader;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;

public class Banner {

    public static void print(String classPath) {
        try (InputStream is = Banner.class.getClassLoader().getResourceAsStream(classPath)) {
            byte[] b = new byte[1024];
            int len = 0;
            while ((len = is.read(b)) != -1) {
                System.out.write(b, 0, len);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) throws InterruptedException {
        System.out.println(new FileReader("siru.txt").readString());
    }
}
